#ifndef DBCONNECTION_H
#define DBCONNECTION_H

#include "./settings/settings.h"

#include<QSqlDatabase>
#include<QSharedPointer>

class DbConnection
{
private:
    DbConnection();
    static QSharedPointer<DbConnection> _instance;
public:
    static QSharedPointer<DbConnection> instance();
    bool setupConnection(QSharedPointer<Settings> settings);
    bool isAlive();

    QSqlDatabase getDb();
    ~DbConnection();
};

#endif // DBCONNECTION_H
